package com.sakana.regex;

public class demo5 {
    public static void main(String[] args) {
        String s="我要学编编编编程程";
        String result=s.replaceAll("(.)\\1+","$1");
        System.out.println(result);
    }
}
